<h1>New Place</h1>

<% form_for(@place,:url=>{:action=>'create'}) do |f| %>
<fieldset>
<%= f.error_messages %>   
  <div><%= f.label :title%><%= f.text_field :title %></div>
  <div><%= f.label :phone%><%= f.text_field :phone %></div>

    <% f.fields_for :address do |address_form| %>
        <div><%= address_form.label :street%><%= address_form.text_field :street %></div>
        <div><%= address_form.label :housenumber%><%= address_form.text_field :housenumber %></div>
        <div><%= address_form.label :city%><%= address_form.text_field :city %></div>
        <div><%= address_form.label :postcode%><%= address_form.text_field :postcode %></div>
    <% end %>
    
  <div><%= f.submit "Create", :class => 'button buttonFullWidth' %></div>
</fieldset>
<% end %>